package com.founder.chd_daily_query.entity.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "WATER_COAL_PURCHASINGPLAN", schema = "RBD_RESULT", catalog = "")
public class WaterCoalPurchasingplanEntity {
    private String contractId;
    private String powerstationId;
    private String purchaseSalePreceptId;
    private Long versionNum;
    private String vendorId;
    private String receiveOrgId;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date effectiveDateB;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date effectiveDateE;
    private String contractCode;
    private String planAttribute;
    private Long contractAmount;
    private Long price;
    private String qualitySortQnet;
    private Long valueBeginQnet;
    private Long valueEndQnet;
    private Long qnet;
    private Long qualitySortStd;
    private Long valueBeginStd;
    private Long valueEndStd;
    private Long std;
    private String transportType;
    private String checkType;
    private Long naturalCoalUnitprice;
    private Long standardCoalUnitprice;
    private Long purchasingUnitprice;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private Long feeId;
    private String contractName;

    @Id
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "POWERSTATION_ID")
    public String getPowerstationId() {
        return powerstationId;
    }

    public void setPowerstationId(String powerstationId) {
        this.powerstationId = powerstationId;
    }

    @Basic
    @Column(name = "PURCHASE_SALE_PRECEPT_ID")
    public String getPurchaseSalePreceptId() {
        return purchaseSalePreceptId;
    }

    public void setPurchaseSalePreceptId(String purchaseSalePreceptId) {
        this.purchaseSalePreceptId = purchaseSalePreceptId;
    }

    @Basic
    @Column(name = "VERSION_NUM")
    public Long getVersionNum() {
        return versionNum;
    }

    public void setVersionNum(Long versionNum) {
        this.versionNum = versionNum;
    }

    @Basic
    @Column(name = "VENDOR_ID")
    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    @Basic
    @Column(name = "RECEIVE_ORG_ID")
    public String getReceiveOrgId() {
        return receiveOrgId;
    }

    public void setReceiveOrgId(String receiveOrgId) {
        this.receiveOrgId = receiveOrgId;
    }

    @Basic
    @Column(name = "EFFECTIVE_DATE_B")
    public Date getEffectiveDateB() {
        return effectiveDateB;
    }

    public void setEffectiveDateB(Date effectiveDateB) {
        this.effectiveDateB = effectiveDateB;
    }

    @Basic
    @Column(name = "EFFECTIVE_DATE_E")
    public Date getEffectiveDateE() {
        return effectiveDateE;
    }

    public void setEffectiveDateE(Date effectiveDateE) {
        this.effectiveDateE = effectiveDateE;
    }

    @Basic
    @Column(name = "CONTRACT_CODE")
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    @Basic
    @Column(name = "PLAN_ATTRIBUTE")
    public String getPlanAttribute() {
        return planAttribute;
    }

    public void setPlanAttribute(String planAttribute) {
        this.planAttribute = planAttribute;
    }

    @Basic
    @Column(name = "CONTRACT_AMOUNT")
    public Long getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(Long contractAmount) {
        this.contractAmount = contractAmount;
    }

    @Basic
    @Column(name = "PRICE")
    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    @Basic
    @Column(name = "QUALITY_SORT_QNET")
    public String getQualitySortQnet() {
        return qualitySortQnet;
    }

    public void setQualitySortQnet(String qualitySortQnet) {
        this.qualitySortQnet = qualitySortQnet;
    }

    @Basic
    @Column(name = "VALUE_BEGIN_QNET")
    public Long getValueBeginQnet() {
        return valueBeginQnet;
    }

    public void setValueBeginQnet(Long valueBeginQnet) {
        this.valueBeginQnet = valueBeginQnet;
    }

    @Basic
    @Column(name = "VALUE_END_QNET")
    public Long getValueEndQnet() {
        return valueEndQnet;
    }

    public void setValueEndQnet(Long valueEndQnet) {
        this.valueEndQnet = valueEndQnet;
    }

    @Basic
    @Column(name = "QNET")
    public Long getQnet() {
        return qnet;
    }

    public void setQnet(Long qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "QUALITY_SORT_STD")
    public Long getQualitySortStd() {
        return qualitySortStd;
    }

    public void setQualitySortStd(Long qualitySortStd) {
        this.qualitySortStd = qualitySortStd;
    }

    @Basic
    @Column(name = "VALUE_BEGIN_STD")
    public Long getValueBeginStd() {
        return valueBeginStd;
    }

    public void setValueBeginStd(Long valueBeginStd) {
        this.valueBeginStd = valueBeginStd;
    }

    @Basic
    @Column(name = "VALUE_END_STD")
    public Long getValueEndStd() {
        return valueEndStd;
    }

    public void setValueEndStd(Long valueEndStd) {
        this.valueEndStd = valueEndStd;
    }

    @Basic
    @Column(name = "STD")
    public Long getStd() {
        return std;
    }

    public void setStd(Long std) {
        this.std = std;
    }

    @Basic
    @Column(name = "TRANSPORT_TYPE")
    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    @Basic
    @Column(name = "CHECK_TYPE")
    public String getCheckType() {
        return checkType;
    }

    public void setCheckType(String checkType) {
        this.checkType = checkType;
    }

    @Basic
    @Column(name = "NATURAL_COAL_UNITPRICE")
    public Long getNaturalCoalUnitprice() {
        return naturalCoalUnitprice;
    }

    public void setNaturalCoalUnitprice(Long naturalCoalUnitprice) {
        this.naturalCoalUnitprice = naturalCoalUnitprice;
    }

    @Basic
    @Column(name = "STANDARD_COAL_UNITPRICE")
    public Long getStandardCoalUnitprice() {
        return standardCoalUnitprice;
    }

    public void setStandardCoalUnitprice(Long standardCoalUnitprice) {
        this.standardCoalUnitprice = standardCoalUnitprice;
    }

    @Basic
    @Column(name = "PURCHASING_UNITPRICE")
    public Long getPurchasingUnitprice() {
        return purchasingUnitprice;
    }

    public void setPurchasingUnitprice(Long purchasingUnitprice) {
        this.purchasingUnitprice = purchasingUnitprice;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "FEE_ID")
    public Long getFeeId() {
        return feeId;
    }

    public void setFeeId(Long feeId) {
        this.feeId = feeId;
    }

    @Column(name = "CONTRACT_NAME")
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Override
    public String toString() {
        return "WaterCoalPurchasingplanEntity{" +
                "contractId='" + contractId + '\'' +
                ", powerstationId='" + powerstationId + '\'' +
                ", purchaseSalePreceptId='" + purchaseSalePreceptId + '\'' +
                ", versionNum=" + versionNum +
                ", vendorId='" + vendorId + '\'' +
                ", receiveOrgId='" + receiveOrgId + '\'' +
                ", effectiveDateB=" + effectiveDateB +
                ", effectiveDateE=" + effectiveDateE +
                ", contractCode='" + contractCode + '\'' +
                ", planAttribute='" + planAttribute + '\'' +
                ", contractAmount=" + contractAmount +
                ", price=" + price +
                ", qualitySortQnet='" + qualitySortQnet + '\'' +
                ", valueBeginQnet=" + valueBeginQnet +
                ", valueEndQnet=" + valueEndQnet +
                ", qnet=" + qnet +
                ", qualitySortStd=" + qualitySortStd +
                ", valueBeginStd=" + valueBeginStd +
                ", valueEndStd=" + valueEndStd +
                ", std=" + std +
                ", transportType='" + transportType + '\'' +
                ", checkType='" + checkType + '\'' +
                ", naturalCoalUnitprice=" + naturalCoalUnitprice +
                ", standardCoalUnitprice=" + standardCoalUnitprice +
                ", purchasingUnitprice=" + purchasingUnitprice +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", feeId=" + feeId +
                ", contractName='" + contractName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WaterCoalPurchasingplanEntity that = (WaterCoalPurchasingplanEntity) o;
        return Objects.equals(contractId, that.contractId) &&
                Objects.equals(purchaseSalePreceptId, that.purchaseSalePreceptId) &&
                Objects.equals(versionNum, that.versionNum) &&
                Objects.equals(vendorId, that.vendorId) &&
                Objects.equals(receiveOrgId, that.receiveOrgId) &&
                Objects.equals(effectiveDateB, that.effectiveDateB) &&
                Objects.equals(effectiveDateE, that.effectiveDateE) &&
                Objects.equals(contractCode, that.contractCode) &&
                Objects.equals(planAttribute, that.planAttribute) &&
                Objects.equals(contractAmount, that.contractAmount) &&
                Objects.equals(price, that.price) &&
                Objects.equals(qualitySortQnet, that.qualitySortQnet) &&
                Objects.equals(valueBeginQnet, that.valueBeginQnet) &&
                Objects.equals(valueEndQnet, that.valueEndQnet) &&
                Objects.equals(qnet, that.qnet) &&
                Objects.equals(qualitySortStd, that.qualitySortStd) &&
                Objects.equals(valueBeginStd, that.valueBeginStd) &&
                Objects.equals(valueEndStd, that.valueEndStd) &&
                Objects.equals(std, that.std) &&
                Objects.equals(transportType, that.transportType) &&
                Objects.equals(checkType, that.checkType) &&
                Objects.equals(naturalCoalUnitprice, that.naturalCoalUnitprice) &&
                Objects.equals(standardCoalUnitprice, that.standardCoalUnitprice) &&
                Objects.equals(purchasingUnitprice, that.purchasingUnitprice) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(feeId, that.feeId) &&
                Objects.equals(contractName, that.contractName);
    }


    @Override
    public int hashCode() {

        return Objects.hash(contractId, purchaseSalePreceptId, versionNum, vendorId, receiveOrgId, effectiveDateB, effectiveDateE, contractCode, planAttribute, contractAmount, price, qualitySortQnet, valueBeginQnet, valueEndQnet, qnet, qualitySortStd, valueBeginStd, valueEndStd, std, transportType, checkType, naturalCoalUnitprice, standardCoalUnitprice, purchasingUnitprice, createDate, lastUpdateDate, feeId, contractName);
    }
}
